// IUserDao
package org.yate.oa.dao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.model.PrivilegeEntity;

/**
 * @author Yate
 * @date 2013年9月23日
 * @description TODO
 * @version 1.0
 */
@Repository(value = "privilegeMapper")
@CacheNamespace(size = 512)
public interface PrivilegeMapper extends IBaseMapperDao<PrivilegeEntity, Long> {

	List<PrivilegeEntity> getTreeByUID(@Param(value = "id") int uid);

	List<PrivilegeEntity> getEntitiesByUID(@Param(value = "id") int uid);

	PrivilegeEntity getEntitiesByUIDAndURL(@Param(value = "uid") int uid,
			@Param(value = "url") String url);

	PrivilegeEntity getEntityBy(final PrivilegeEntity e);

	PrivilegeEntity getEntityByUIDAndPID(@Param(value = "uid") int uid,
			@Param(value = "pid") long pid);
}
